// 导入主题
@import "../styles/themes.scss";

.date-calculator {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-color);
  font-size: 28px;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 50px;

  .converter-header {
    width: 100%;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 20px;

    .header-title {
      font-size: 36px;
      font-weight: bold;
      color: var(--primary-color);
    }
  }

  .tab-content {
    width: 95%;
    padding: 20px 0;
  }

  .group-container {
    margin-bottom: 24px;
    padding: 20px 24px;
    background-color: var(--card-bg-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow);

    .group-title {
      font-size: 28px;
      font-weight: 500;
      color: var(--text-primary-color);
      margin-bottom: 16px;
    }
  }

  .cell-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);

    &:last-child {
      border-bottom: none;
    }

    .cell-title {
      font-size: 26px;
      color: var(--text-primary-color);
    }

    .cell-value {
      display: flex;
      align-items: center;
      color: var(--text-secondary-color);
      font-size: 26px;

      .date-value {
        margin-right: 8px;
      }
    }
  }

  .result-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;

    .result-label {
      font-size: 26px;
      color: var(--text-primary-color);
      margin-bottom: 16px;
      text-align: center;
    }

    .result-value-container {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;

      .result-value {
        font-size: 48px;
        font-weight: bold;
        color: var(--primary-color);
      }

      .result-unit {
        font-size: 32px;
        color: var(--text-secondary-color);
        margin-left: 8px;
      }
    }
  }

  .radio-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .button-container {
    margin: 24px 0;
    padding: 0 24px;
    width: 100%;

    .taroify-button {
      height: 88px;
      font-size: 32px;
      border-radius: 44px;
      background: var(--button-bg) !important;
      border: none !important;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    }
  }

  .operation-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;

    .operation-button {
      flex: 1;
      text-align: center;
      padding: 12px 0;
      border-radius: 8px;
      font-size: 28px;
      transition: background-color 0.3s, color 0.3s;

      &.active {
        background-color: var(--primary-color);
        color: white;
      }

      &.inactive {
        background-color: var(--bg-color);
        color: var(--text-secondary-color);
      }
    }

    .operation-button:first-child {
      margin-right: 10px;
    }
  }

  .input-field {
    width: 100%;
    height: 80px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0 16px;
    font-size: 28px;
    color: var(--text-primary-color);
    background-color: var(--bg-color);
    margin-bottom: 16px;
  }
}

// 日期选择器样式
.date-picker-popup {
  .taroify-datetime-picker__toolbar {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    font-size: 28px;

    .taroify-datetime-picker__cancel {
      color: var(--text-secondary-color);
    }

    .taroify-datetime-picker__confirm {
      color: var(--primary-color);
      font-weight: 500;
    }
  }
}

// 覆盖Taroify Tabs组件样式
.taroify-tabs__tab {
  font-size: 28px !important;
  color: var(--text-secondary-color) !important;

  &--active {
    color: var(--primary-color) !important;
    font-weight: 500 !important;
  }
}

.taroify-tabs__line {
  background-color: var(--primary-color) !important;
}

// 覆盖Radio组件样式
.taroify-radio__icon--checked {
  color: var(--primary-color) !important;
}

.taroify-radio__icon--checked .taroify-icon {
  color: var(--primary-color) !important;
}

.taroify-radio__label {
  font-size: 24px !important;
  color: var(--text-primary-color) !important;
}
